<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>controlP5 : : ControlWindow</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
document.getElementsByTagName('html')[0].className = 'isjs';

function toggle(dt) 
{ 
  var display, dd=dt; 
  /* get dd */ 
  do{ dd = dd.nextSibling } while(dd.tagName!='DD'); 
  toOpen =!dd.style.display; 
  dd.style.display = toOpen? 'block':'' 
  dt.getElementsByTagName('span')[0].innerHTML 
    = toOpen? '-':'+' ; 
} 
</script>
</head>
<body>
<div id="container">
		<div id="header">
		<a href="./index.htm"><img src="./docuImages/title.jpg" /></a>
		</div>
	<div class="content">
		<h1>ControlWindow</h1>
		<dl><dt class="key">description</dt><dd class="value">the purpose of a control window is to outsource controllers so that they dont
 need to be drawn into the actual processing window. to save cpu, a control
 window is not updated when not active - in focus. for the same reason the
 framerate is set to 15.</dd></dl>
			
			<div class="toggleList example">
				<dl><dt onclick="toggle(this)"><span>+</span>Example</dt>
					<dd><pre>import controlP5.*;

ControlP5 controlP5;

int myColorBackground = color(0,0,0);

ControlWindow controlWindow;

public int sliderValue = 40;

void setup() {
  size(400,400);  
  frameRate(25);
  controlP5 = new ControlP5(this);
  controlP5.setAutoDraw(false);
  controlWindow = controlP5.addControlWindow("controlP5window",100,100,400,200);
  controlWindow.setBackground(color(40));
  Controller mySlider = controlP5.addSlider("sliderValue",0,255,40,40,100,10);
  mySlider.setWindow(controlWindow);
  Textfield field = controlP5.addTextfield("myWindowTextfield",70,130,100,20);
  field.setWindow(controlWindow);

  controlP5.addSlider("sliderValue1",0,255,40,40,100,10);
  controlP5.addTextfield("myTextfield",70,130,40,20);
}

void draw() {
  background(sliderValue);
  controlP5.draw();
}

void myTextfield(String theValue) {
  println(theValue);
}

void myWindowTextfield(String theValue) {
  println("from controlWindow: "+theValue);
}

void keyPressed() {
  if(key==',') controlP5.window("controlP5window").hide();
  if(key=='.') controlP5.window("controlP5window").show();
  // controlWindow = controlP5.addControlWindow("controlP5window2",600,100,400,200);
  // controlP5.controller("sliderValue1").moveTo(controlWindow);
}

</pre></dd>
				</dl>
			</div>
			
			
			
			<dl><dt class="key">constructors</dt><dd class="value"><pre></pre></dd></dl>
			
			
			
			
			
			
			
			<!-- METHODS:BEGIN -->
			
       <dl class="noborder"><dt>Methods</dt></dl>
       <dl><dt class="key"><a href="controlwindow_method_activatetab.htm">activateTab ( )</a></dt><dd class="value">activate a tab of a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_add.htm">add ( )</a></dt><dd class="value">add a tab to the control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_clear.htm">clear ( )</a></dt><dd class="value">clear the control window, delete all controllers from a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_currenttab.htm">currentTab ( )</a></dt><dd class="value">get the current active tab of a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_framerate.htm">frameRate ( )</a></dt><dd class="value">set the frame rate of the control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_hide.htm">hide ( )</a></dt><dd class="value">hide the controllers and tabs of the ControlWindow.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_ismouseover.htm">isMouseOver ( )</a></dt><dd class="value">returns true if the mouse is inside a controller. !!! doesnt work for
 groups yet.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_isupdate.htm">isUpdate ( )</a></dt><dd class="value">check the update status of a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_isvisible.htm">isVisible ( )</a></dt><dd class="value">check if the content of the control window is visible.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_name.htm">name ( )</a></dt><dd class="value">get the name of the control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_remove.htm">remove ( )</a></dt><dd class="value">remove a control window from controlP5.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_removetab.htm">removeTab ( )</a></dt><dd class="value">remove a tab from a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_setbackground.htm">setBackground ( )</a></dt><dd class="value">set the background color of the control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_setcolorvalue.htm">setColorValue ( )</a></dt><dd class="value">set the color of the values.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_setupdate.htm">setUpdate ( )</a></dt><dd class="value">enable or disable the update function of a control window.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_setupdatemode.htm">setUpdateMode ( )</a></dt><dd class="value">set the draw mode of a control window. a separate control window is only
 updated when in focus. to update the context of the window continuously,
 use yourControlWindow.setUpdateMode(ControlWindow.NORMAL); otherwise use
 yourControlWindow.setUpdateMode(ControlWindow.ECONOMIC); for an economic,
 less cpu intensive update.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_show.htm">show ( )</a></dt><dd class="value">show the controllers and tabs of the ControlWindow.</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_tab.htm">tab ( )</a></dt><dd class="value">get a tab by name of a control window</dd></dl>
<dl><dt class="key"><a href="controlwindow_method_update.htm">update ( )</a></dt><dd class="value">update all controllers contained in the control window if update is
 enabled.</dd></dl>

   
			<!-- METHODS:END -->
			<div class="separator">
			<dl><dt class="key">usage</dt><dd class="value">Web & Application</dd></dl>
			</div>
			<div class="separator">
			<dl><dt class="key">related</dt><dd class="value"><ul></ul></dd></dl>
			</div>
	</div>
	<div id="footer">
	<p>by andreas schlegel (<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank">cc</a>) 2007, <a href="http://www.sojamo.de" target="_blank">sojamo</a>.</p>
	</div>
</div>
</body>
</html>


